package com.mike.employment.po;

import com.mike.employment.base.BaseEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToOne;
import lombok.Getter;
import lombok.Setter;

@Entity
@Getter
@Setter
public class Account extends BaseEntity{
	
	@Column(nullable = false,unique = true)
	private String name;    //账户名称
	@Column(nullable = false)
	private String pwd;    // 密码
	private String avatar;  // 头像
	private String desp;  // 描述
	@Column(nullable = false)
	private Integer status = 0; // 0:正常   1：禁用
	@ManyToOne(targetEntity = Role.class)
	private Role role; //账户角色
	@OneToOne(targetEntity = UserInfo.class)
	private UserInfo userInfo;  //个人详细信息
	@OneToOne(targetEntity = Company.class)
	private Company company; //企业信息
	
}
